package ThreadDemo;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadDemo13 {
    public static void main(String[] args) {
        ExecutorService service=Executors.newFixedThreadPool(10);
        for (int i = 0; i < 20; i++) {
            Thread t=new Thread(new Runnable() {
                @Override
                public void run() {
                    System.out.println("hehe");
                }
            });
            t.start();
        }
    }
}
